package com.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.api.common.jwt.TokenIgnore;
import com.api.common.reqres.Request;
import com.api.common.reqres.Response;
import com.api.model.request.TestRequest;
import com.api.model.response.TestResponse;
import com.api.service.TestService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@TokenIgnore
@Api("测试")
@RestController
public class TestController {

	@Autowired
	private TestService testService;

	@ApiOperation(notes = "通过名字获取用户信息", value = "测试接口")
	@PostMapping(value = "/test.do")
	public Response<TestResponse> test(@RequestBody Request<TestRequest> request) throws Exception {
		return testService.test(request);
	}
}
